import createHeading from './heading.js'
import '../src/assets/css/main.css'
import icon1 from '../src/assets/image/icon_order_pay.png'
// import icon2 from '../src/assets/image/activity_ronge_3x.png'
import md from '../README.md'
const heading = createHeading()

document.body.append(heading)

const img = new Image()
img.src = icon1
document.body.append(img)
console.log(md)

let lastHeading = heading
module.hot.accept('./heading.js', () => {
  // 此处编写热替换代码逻辑
  document.body.removeChild(lastHeading)
  const newCreateHeading = createHeading()
  document.body.appendChild(newCreateHeading)
  lastHeading = newCreateHeading
})
// document.body.append(JSON.parse(md))